﻿using Catastrophe.Common.FileM;
using Catastrophe.CommonCore.FileM;
using SqlSugarEx.Config;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Catastrophe.Initialize.SystemIni
{
    public class FileConfigIni : IFileIni, IRunManager
    {
        /// <summary>
        /// 
        /// </summary>
        public bool IsRun{ get; set; }
        /// <summary>
        /// 文件名
        /// </summary>
        private const string systemdb = "systemdb";

        /// <summary>
        /// 系统配置数据库
        /// </summary>
        private static DbAppConfig _dbAppConfig;

        /// <summary>
        /// 系统配置数据库
        /// </summary>
        public static DbAppConfig GetDbAppConfig => FileConfigIni._dbAppConfig ??
            (FileConfigIni._dbAppConfig = new FileConfigManager<DbAppConfig>(FileTypeEnum.Json, systemdb + ".json").ReadEntity());
        public void FileLoad()
        {
            
        }
    }
}
